package hu.bme.mb1027.mav.qrdecode;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;

public class SpaceAdder {
	static void spaceAdder(){
		try {
		ArrayList<Character> al = new ArrayList<Character>();
		BufferedReader in = new BufferedReader(new FileReader("d:\\Bence\\qr-decode\\raw_content.txt"));
		PrintWriter fout = new PrintWriter(new FileWriter("d:\\Bence\\qr-decode\\raw_content_new.txt")); 
		while(in.ready()){
			for(int i=0;i<2;i++){
				al.add((char)in.read());
			}
			al.add(' ');
		}
		in.close();
		
		for(int i=0;i<al.size();i++){
			fout.print(al.get(i));
		}
		fout.close();
		
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
	}
}
